package cn.funeralobjects.upms.entity;

import cn.funeralobjects.common.jpa.entity.BaseCloudJpaEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 登陆实体
 *
 * @author FuneralObjects
 * Create date: 2019-08-09 14:43
 */
@EqualsAndHashCode(callSuper = true)
@Table(name = "t_login_user")
@Entity
@Data
@DynamicUpdate
@DynamicInsert
@Accessors(chain = true)
public class ELoginUser extends BaseCloudJpaEntity<Integer> {
    /**
     * reference -> user.id
     * {@link EUser#getId()}
     */
    private Integer userId;
    /**
     * 密码（非明文）
     */
    private String password;

//    @ManyToOne(fetch = FetchType.LAZY)
//    @JoinColumn(name = "user_id")
//    private EUser user;
}
